package com.alcloud.springplus.base;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @className: GenericDao
 * @description: 通用Dao 类
 * @author: AllG
 * @createDate: 2018/12/4 11:45
 * @updateRemark: 更新说明
 */
public interface GenericDao<T, ID> extends JpaRepository<T, ID> {
    /**
     * @param spec
     * @param pageable
     * @return org.springframework.data.domain.Page<S>
     * @method findAll
     * @description 通用动态查询绑定
     * @date: 2018/12/6 13:48
     * @author: AllG
     */
    public <S extends T> Page<S> findAll(Specification<S> spec, Pageable pageable);


}
